﻿<!DOCTYPE html>
<html manifest="/websocket.appcache">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>WebSocket 在线测试</title>    
    <script type="text/javascript">
    </script>

    <link href="res.js" rel="stylesheet"/>
    <script src="base.js"></script> 
    <script src="websocket.js"></script>


</head>
<body>
    
<div class="container">
    <div class="page-header">
        <h2 style="margin-top:-20px;margin-left:20px; text-align:center; ">WebSocket协议 在线测试</h2>
    </div>
    <div class="row" style="margin-bottom:20px;">
        <div class="col-sm-6 col-md-5 col-lg-4">
            <div>
                <input type="text" class="form-control" style="margin-bottom:3px;" id="inp_url" placeholder="连接的地址" value="ws://192.168.1.5:888?rid=DFC76286A2F293472D6166F72CA58EAB&flag=1" />
                <button type="button" id="btn_conn" class="btn btn-primary">连接</button>
                <button type="button" id="btn_close" class="btn btn-danger" disabled="disabled">断开</button>
                <span class="btn btn-default" id="btn_clear">清空消息</span>
                <a href="/" class="btn btn-default">首 页</a>
            </div>
            <br />
            <div class="well well-sm" style="font-size:12px;">
                <p>连接格式为 ws://IP:端口（示例ws://192.168.1.5:80）</p>
                <p>测试只需要输入内网地址</p>
            </div>
            <div style="margin-bottom:20px;">
                <textarea id="inp_send" class="form-control" style="margin-bottom:3px;min-height:220px;" placeholder="发送的内容"></textarea>
                <button type="button" id="btn_send" class="btn btn-info btn-block">发送（ctrl+回车）</button>
            </div>
        </div>
        <div class="col-sm-6 col-md-7 col-lg-8">
            <div id="div_msgzone" class="panel panel-default">
                <div class="panel-heading">消息窗口</div>
                <div id="div_msg" class="panel-body" style="min-height:400px;"></div>
            </div>
        </div>
    </div>

</div>

</body>
</html>
